using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace RxjhServer
{
	public class UserIdList : Form
	{
		private string _username;

		private PropertyGrid propertyGridNPC;

		private ListView listView1;

		private ColumnHeader columnHeader5;

		private ColumnHeader columnHeader1;

		public string username
		{
			get
			{
				return _username;
			}
			set
			{
				_username = value;
			}
		}

		public UserIdList()
		{
			InitializeComponent();
		}

		private void UserIdList_Load(object sender, EventArgs e)
		{
			try
			{
				foreach (Players value in World.allConnectedChars.Values)
				{
					if (value.UserName == username)
					{
						additmes("UserId", value.Userid);
						additmes("UserName", value.UserName);
						additmes("Vip属性----------", "-------------");
						additmes("Vip等级", value.Player_vip_leve);
						additmes("会员攻击", value.FLD_VIP_攻击);
						additmes("会员防御", value.FLD_VIP_防御);
						additmes("基础属性----------", "-------------");
						additmes("FLD_体", value.FLD_体);
						additmes("FLD_力", value.FLD_力);
						additmes("FLD_命中", value.FLD_命中);
						additmes("FLD_回避", value.FLD_回避);
						additmes("FLD_心", value.FLD_心);
						additmes("FLD_身", value.FLD_身);
						additmes("人物_HP", value.人物_HP);
						additmes("人物_MP", value.人物_MP);
						additmes("人物_SP", value.人物_SP);
						additmes("人物PK模式", value.人物PK模式);
						additmes("人物武勋", value.Player_WuXun);
						additmes("人物善恶", value.人物善恶);
						additmes("人物等级", value.Player_Level);
						additmes("人物经验", value.人物经验);
						additmes("人物最大经验", value.人物最大经验);
						additmes("人物钱数", value.Player_Money);
						additmes("人物职业", value.Player_Job);
						additmes("人物职业等级", value.Player_Job_leve);
						additmes("基础属性----------", "-------------");
						additmes("FLD_防御", value.FLD_防御);
						additmes("FLD_攻击", value.FLD_攻击);
						additmes("FLD_人物基本_防御", value.FLD_人物基本_防御);
						additmes("FLD_人物基本_攻击", value.FLD_人物基本_攻击);
						additmes("FLD_人物基本_命中", value.FLD_人物基本_命中);
						additmes("FLD_人物基本_回避", value.FLD_人物基本_回避);
						additmes("人物追加----------", "-------------");
						additmes("FLD_人物_追加_防御", value.FLD_人物_追加_防御);
						additmes("FLD_人物_追加_攻击", value.FLD_人物_追加_攻击);
						additmes("FLD_人物_追加_命中", value.FLD_人物_追加_命中);
						additmes("FLD_人物_追加_回避", value.FLD_人物_追加_回避);
						additmes("FLD_人物_武功防御力增加百分比", value.FLD_人物_武功防御力增加百分比);
						additmes("FLD_人物_武功攻击力增加百分比", value.FLD_人物_武功攻击力增加百分比);
						additmes("FLD_追加百分比_HP上限", value.FLD_追加百分比_HP上限);
						additmes("FLD_追加百分比_MP上限", value.FLD_追加百分比_MP上限);
						additmes("FLD_追加百分比_命中", value.FLD_追加百分比_命中);
						additmes("FLD_追加百分比_回避", value.FLD_追加百分比_回避);
						additmes("FLD_追加百分比_防御", value.FLD_追加百分比_防御);
						additmes("FLD_追加百分比_攻击", value.FLD_追加百分比_攻击);
						additmes("气功追加----------", "-------------");
						additmes("FLD_人物_气功_防御", value.FLD_人物_气功_防御);
						additmes("FLD_人物_气功_攻击", value.FLD_人物_气功_攻击);
						additmes("FLD_人物_气功_命中", value.FLD_人物_气功_命中);
						additmes("FLD_人物_气功_回避", value.FLD_人物_气功_回避);
						additmes("人物_气功_追加_HP", value.人物_气功_追加_HP);
						additmes("人物_气功_追加_MP", value.人物_气功_追加_MP);
						additmes("FLD_人物_气功_武功防御力增加百分比", value.FLD_人物_气功_武功防御力增加百分比);
						additmes("FLD_人物_气功_武功攻击力增加百分比", value.FLD_人物_气功_武功攻击力增加百分比);
						additmes("装备追加----------", "-------------");
						additmes("FLD_装备_追加_HP", value.FLD_装备_追加_HP);
						additmes("FLD_装备_追加_MP", value.FLD_装备_追加_MP);
						additmes("FLD_装备_追加_防御", value.FLD_装备_追加_防御);
						additmes("FLD_装备_追加_攻击", value.FLD_装备_追加_攻击);
						additmes("FLD_装备_追加_命中", value.FLD_装备_追加_命中);
						additmes("FLD_装备_追加_回避", value.FLD_装备_追加_回避);
						additmes("FLD_装备_追加_气功", value.FLD_装备_追加_气功);
						additmes("FLD_装备_追加_武器_强化", value.FLD_装备_追加_武器_强化);
						additmes("FLD_装备_追加_防具_强化", value.FLD_装备_追加_防具_强化);
						additmes("FLD_装备_武功防御力增加百分比", value.FLD_装备_武功防御力增加百分比);
						additmes("FLD_装备_武功攻击力增加百分比", value.FLD_装备_武功攻击力增加百分比);
						additmes("追加状态----------", "-------------");
						foreach (追加状态类 value2 in value.追加状态列表.Values)
						{
							additmes(value2.FLD_PID.ToString(), value2.npcyd.Interval);
						}
						break;
					}
				}
			}
			catch (Exception ex)
			{
				Form1.WriteLine(1, "人物列表出错" + ex?.ToString());
			}
		}

		public void additmes(string a, object b)
		{
			string[] array = new string[2];
			try
			{
				array[0] = a;
				array[1] = b.ToString();
				listView1.Items.Insert(listView1.Items.Count, new ListViewItem(array));
			}
			catch
			{
			}
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RxjhServer.UserIdList));
			propertyGridNPC = new System.Windows.Forms.PropertyGrid();
			listView1 = new System.Windows.Forms.ListView();
			columnHeader5 = new System.Windows.Forms.ColumnHeader();
			columnHeader1 = new System.Windows.Forms.ColumnHeader();
			SuspendLayout();
			propertyGridNPC.Location = new System.Drawing.Point(313, 127);
			propertyGridNPC.Margin = new System.Windows.Forms.Padding(2);
			propertyGridNPC.Name = "propertyGridNPC";
			propertyGridNPC.PropertySort = System.Windows.Forms.PropertySort.Categorized;
			propertyGridNPC.Size = new System.Drawing.Size(174, 59);
			propertyGridNPC.TabIndex = 7;
			listView1.Columns.AddRange(new System.Windows.Forms.ColumnHeader[2]
			{
				columnHeader5,
				columnHeader1
			});
			listView1.Dock = System.Windows.Forms.DockStyle.Fill;
			listView1.ForeColor = System.Drawing.SystemColors.WindowText;
			listView1.FullRowSelect = true;
			listView1.GridLines = true;
			listView1.Location = new System.Drawing.Point(0, 0);
			listView1.Name = "listView1";
			listView1.Size = new System.Drawing.Size(302, 408);
			listView1.TabIndex = 8;
			listView1.UseCompatibleStateImageBehavior = false;
			listView1.View = System.Windows.Forms.View.Details;
			columnHeader5.Text = "名称";
			columnHeader5.Width = 170;
			columnHeader1.Text = "数据";
			columnHeader1.Width = 90;
			base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			base.ClientSize = new System.Drawing.Size(302, 408);
			base.Controls.Add(listView1);
			base.Controls.Add(propertyGridNPC);
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.Name = "UserIdList";
			Text = "人物详细属性";
			base.Load += new System.EventHandler(UserIdList_Load);
			ResumeLayout(false);
		}
	}
}
